<template>
	<view class="">
		<view class="topbox">
			<u-navbar title="我是商家" title-color="#ffffff" title-size="36" :border-bottom="false"
				:background="background"></u-navbar>
			<view class="infobox">
				<image src="../../static/扫一扫，猫客.png" mode="" class="sys" @click="sao"></image>
				<view class="topboxs">
					<image src="../../static/头像.jpg" mode=""></image>
					<view class="leftbox">
						<view class="name">
							大吃货
						</view>
						<view class="dp">
							葵葵旗舰店
						</view>
					</view>
				</view>
				<view class="centerbox">
					<view class="">
						<view class="price">
							500.00元
						</view>
						<view class="title">
							累计收益
						</view>
					</view>
					<view class="">
						<view class="price">
							500.00元
						</view>
						<view class="title">
							余额
						</view>
					</view>
				</view>
				<view class="ljtx" @click="withdraw">
					立即提现
				</view>
			</view>
			<u-tabs active-color="#f73f33" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
			<view class="lastbox">
				<view class="total">
					本月115单共计1233元
				</view>
				<view class="listbox">
					<view class="leftbox">
						<view class="name">
							双人套餐
						</view>
						<view class="order">
							订单号：159989
						</view>
					</view>
					<view class="rightbox">
						<view class="price">
							+129
						</view>
						<view class="time">
							2019-6-6 18:00
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					background: 'https://cdn.uviewui.com/uview/swiper/1.jpg no-repeat',
				},
				list: [{
					name: '核销明细'
				}, {
					name: '订单明细'
				}, {
					name: '余额明细',
				}],
				current: 0
			}
		},
		methods: {
			change(v) {
				this.current = v
			},
			// 提现
			withdraw() {
				this.jumpLink({
					link: "/pagesB/withdraw/index"
				})
			},
			sao() {
				uni.scanCode({
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topbox {
		height: 606rpx;
		background-image: url(../../static/bj.png);
		background-size: 100% 606rpx;

		.infobox {
			width: 690rpx;
			height: 492rpx;
			background-color: #ffffff;
			box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(142, 135, 135, 0.1);
			border-radius: 15rpx;
			margin-left: 30rpx;
			padding: 25rpx;
			box-sizing: border-box;
			position: relative;

			.sys {
				width: 40rpx;
				height: 40rpx;
				position: absolute;
				top: 53rpx;
				right: 34rpx;
			}

			.topboxs {
				display: flex;
				align-items: center;

				image {
					width: 120rpx;
					height: 120rpx;
					border-radius: 120rpx;
				}

				.leftbox {
					margin-left: 30rpx;

					.name {
						font-family: MicrosoftYaHei;
						font-size: 36rpx;
						color: #000000;
						font-weight: 700;
					}

					.dp {
						font-family: MicrosoftYaHei;
						font-size: 28rpx;
						color: #444444;
						margin-top: 10rpx;
					}
				}
			}

			.centerbox {
				display: flex;
				align-items: center;
				justify-content: space-around;
				text-align: center;
				margin-top: 30rpx;

				.price {
					font-family: SourceHanSansCN-Bold;
					font-size: 30rpx;
					font-weight: 700;
					color: #222222;
				}

				.title {
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					color: #666666;
					margin-top: 20rpx;
				}
			}

			.ljtx {
				width: 404rpx;
				height: 90rpx;
				background-color: #f73f33;
				border-radius: 45rpx;
				line-height: 90rpx;
				text-align: center;
				color: #FFFFFF;
				font-family: SourceHanSansCN-Regular;
				font-size: 36rpx;
				margin: 0 auto;
				margin-top: 65rpx;
			}
		}
	}

	.lastbox {
		background-color: #fff;
		padding: 38rpx;
		box-sizing: border-box;

		.total {
			text-align: center;
			font-family: SourceHanSansCN-Regular;
			font-size: 28rpx;
			color: #222222;
		}

		.listbox {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 57rpx;

			.leftbox {
				.name {
					font-family: SourceHanSansCN-Regular;
					font-size: 28rpx;
					color: #444444;
				}

				.order {
					font-family: SourceHanSansCN-Regular;
					font-size: 28rpx;
					color: #999999;
					margin-top: 5rpx;
				}
			}

			.rightbox {
				.price {
					font-family: SourceHanSansCN-Regular;
					font-size: 30rpx;
					color: #232323;
				}

				.time {
					margin-top: 5rpx;
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					color: #999999;
				}
			}
		}
	}
</style>
